<?php
	/* @var $auth KontorX_View_Helper_Auth */
	$auth = $this->getHelper('Auth');
	
	/* @var $acl KontorX_View_Helper_Acl */
	$acl = $this->getHelper('Acl');
	$acl = $acl->getAcl();
	
	$model = Admin_Model_Modules::getInstance();
	$navigation = $model->getNavigation();

	/* @var $menu Zend_View_Helper_Navigation_Menu */
	$menu = $this->getHelper('navigation')->menu($navigation);
	$menu->setUseAcl(true)
		 ->setAcl($acl)
		 ->setRole($auth->getIndentity('role'));

	print $menu->render();
?>

<p id="menu-user">
	Jesteś zalogowany jako,
			<a href="<?php print $this->url(array('module'=>'user', 'controller' => 'user', 'action' => 'edit', 'id' => $auth->getIndentity('id')), null, true) ?>" title="Edycja Twojego profilu">
				<?php print $auth->getIndentity('username', $this->translate('guest'))?></a>
	|
	
	<a href="<?php print $this->url(array('module'=>'user', 'controller' => 'auth', 'action' => 'logout'), null, true) ?>">Wyloguj</a>
</p>